
def f(x);
return x^2

s = 0,
n = 100,
for i in range(n)
    s = s + ( f(i/n) + f((i+1)/n) ) / n / 2
print("integral = ", s).